#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QProgressBar>
#include <QThreadPool>
#include <QMutex>
#include <QProgressBar>
#include <QPaintEvent>
#include "Library.h"

class MainWidget : public QWidget
{
	Q_OBJECT

	static const int maxBooksNumber = 10;
	static const int readersNumber = 5;
	static const int writersNumber = 5;
	static const int readingTime = 1000;
	static const int writingTime = 1000;
	static const int editTime = 1000;

	Library *library;
	QThreadPool threadPool;
	QMutex mutex;
	QProgressBar *activeThreadsProgress;
	QProgressBar *waitingThreadsProgress;
public:
	explicit MainWidget(QWidget *parent = 0);
	
signals:
	
public slots:
	void increaseActive();
	void increaseWaiting();
};

#endif // MAINWIDGET_H
